Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Update circle. #270

Merged
merged 4 commits into from
Aug 31, 2018
Merged

Update circle. #270

merged 4 commits into from
Aug 31, 2018

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Aug 21, 2018

Update the config of circleci to version 2

  • Removed tox
  • Build with Builder was failing, added the configs of dash-component-boilerplate.
  • There is nothing but the tests to pylint, and they fail with really low score, so Pylint is out for now.

The test_link_scroll

def display_page(pathname):
call_count.value = call_count.value + 1
return 'You are on page {}'.format(pathname)
self.startServer(app=app)
time.sleep(2)
#callback is called twice when defined
self.assertEqual(
call_count.value,
2
)
is somewhat brittle and sometimes fails.

@valentijnnieman
Copy link
Contributor

@Marc-Andre-Rivet Could you perhaps review this if you have time? I think you know this stuff pretty well!

version: 2

jobs:
"python-2.7": &test-template
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not aware of this syntax '&test-template', you use it to refer to this job configuration for python36 and 37 so you can just override what you need?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I took that from plotly/dash#222.

- run:
name: Run tests
command: |
npm run test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not important, but you can do 'npm test' instead

package.json Outdated
@@ -17,17 +17,25 @@
"publish-all": "npm publish && python setup.py sdist upload",
"publish-pypi": "npm run prepublish && python setup.py sdist && twine upload --sign --skip-existing",
"start": "./node_modules/.bin/builder run build-dev",
"test": "./node_modules/.bin/eslint --fix .",
"test": "./node_modules/.bin/eslint --fix src",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it weird that test is used to fix linting errors. Should probably be a script of its own like 'fixlint', 'lint.fix' or something along those lines.
You should be able to call 'eslint --fix src' directly instead too, same for builder above.

I would expect eslint to be in the list of dependencies if we are calling it in our scripts. We should not trust babel-eslint to pull it along.

},
"author": "Chris Parmer <[email protected]>",
"license": "MIT",
"dependencies": {
"babel-core": "^6.26.3",
Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet Aug 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a shrinkwrap or package-lock file for this project? If we do not we should, as it makes the version of the dependencies downloaded by our users more predictable and saves us from weird compatibility issues that may arise from various technically-compatible but not identical versions.

}
]
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this new webpack.config.js file? The webpack config stuff for the components is in ./config/webpack/, won't it be confusing to have 2 config files for webpack?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old configs were for webpack 3, this is for webpack 4.

@valentijnnieman
Copy link
Contributor

@T4rk1n Maybe it's a good idea to update the .eslintrc file too while we're at it? In #274 I've used the settings taken from plotly/streambed, maybe we can do that here too? What do you think?

@T4rk1n
Copy link
Contributor Author

T4rk1n commented Aug 22, 2018

@valentijnnieman Yes we should add the prettier here, Its in the list plotly/dash#328

@valentijnnieman
Copy link
Contributor

valentijnnieman commented Aug 22, 2018

@T4rk1n Cool! You could try merging in the #274 branch if you want! something went wrong with that branch, I pulled from it in another branch, deleted it, and merged that branch which caused #274 to be merged as well. My mistake!

@T4rk1n
Copy link
Contributor Author

T4rk1n commented Aug 30, 2018

@valentijnnieman I have added prettier and fixed the errors it was reporting, for the tabs file I put a eslint-disable at the top because it was reporting a bunch of prop types error for the EnhancedTab. Please review.

@valentijnnieman
Copy link
Contributor

@T4rk1n Oh yeah <EnhancedTab/> isn't using propTypes. I'll fix that later. Nice work! 💃

@chriddyp
Copy link
Member

💃

@chriddyp chriddyp closed this Aug 31, 2018
@chriddyp chriddyp reopened this Aug 31, 2018
@T4rk1n T4rk1n merged commit 557d2fd into master Aug 31, 2018
@T4rk1n T4rk1n deleted the update-circle branch August 31, 2018 14:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants